Regarding regular expression

Hello,

in regular expression we can obtained value from match 0 to 9 but if i want to obtained value of match 10 then what i need to do?

please help me out.

i am using this concept in importing .CSV file into DOORS.
i had write script for that. i am able to get values upto match 9 but unable to get values after match 9

i have attached.txt file which contains DXL script.

Data present in .csv file is in following format
Basis-Variante ; Sessions ; Default ; Start ; Default Start ; Default_Start ; 10 01 ; P ; F ; ($10) DiagnosticSessionControl ; "qpath:/Session/Default/SERVICEStart"

please give me some solution to this. how i can get last two values i.e. ($10) DiagnosticSessionControl and "qpath:/Session/Default/SERVICEStart"

Thanks in advance

Regards,
Hemlata
SystemAdmin - Wed Mar 20 06:40:32 EDT 2013

Re: Regarding regular expression
llandale - Wed Mar 20 11:38:57 EDT 2013

9 is the max. You will need to make up a sub-regexp search. If the 1st matches then take one of the interim matches and issue a 2nd regexp on that.

Re: Regarding regular expression
SystemAdmin - Thu Mar 21 03:00:58 EDT 2013

llandale - Wed Mar 20 11:38:57 EDT 2013
9 is the max. You will need to make up a sub-regexp search. If the 1st matches then take one of the interim matches and issue a 2nd regexp on that.

can you please explain in detail. what i exactly need to do?

Thanks!

Regards,
Hemlata

Re: Regarding regular expression
SystemAdmin - Thu Mar 21 06:25:03 EDT 2013

SystemAdmin - Thu Mar 21 03:00:58 EDT 2013
can you please explain in detail. what i exactly need to do?

Thanks!

Regards,
Hemlata

Hi

Instead of
 

Regexp RSPACE = regexp2 "([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);(.*)"

 


You shall use:

 

 

 

Regexp RSPACE = regexp2 "^([^;]*);(.*)$"



This expression has two matches. The first is the sequence up to the first ";" and the second is "the Rest".

And then you can take the second match. Hier the first part is missing. If you perform the regular expression again, you will have the second entry and so on.

Best regards
Wolfgang



 

 

Re: Regarding regular expression
SystemAdmin - Fri Mar 22 07:07:17 EDT 2013

SystemAdmin - Thu Mar 21 06:25:03 EDT 2013

Hi

Instead of
 

Regexp RSPACE = regexp2 "([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);(.*)"

 


You shall use:

 

 

 

Regexp RSPACE = regexp2 "^([^;]*);(.*)$"



This expression has two matches. The first is the sequence up to the first ";" and the second is "the Rest".

And then you can take the second match. Hier the first part is missing. If you perform the regular expression again, you will have the second entry and so on.

Best regards
Wolfgang



 

 

Thanks for replying

can you please explain me by giving some example

Hemlata